package cn.engage.ekcc.domain;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author director
 * @since 2022-11-18
 */
@TableName("t_product_log")
public class ProductLog extends Model<ProductLog> {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 对应产品id
     */
    @TableField("product_id")
    @NotNull(message = "审核产品不能为空")
    private Long productId;
    /**
     * 日志
     */
    @NotEmpty(message = "审核日志不能为空")
    private String log;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getLog() {
        return log;
    }

    public void setLog(String log) {
        this.log = log;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ProductLog{" +
        ", id=" + id +
        ", productId=" + productId +
        ", log=" + log +
        "}";
    }
}
